Ml-style Typing, Lambda Lifting, and Partial Evaluation

نویسنده

  • Peter Thiemann
چکیده

Lambda lifting transforms local function deenitions in functional programming languages into global ones to facilitate their eecient implementation. When considered as a source-to-source transformation for an ML-style typed language, all published algorithms for lambda lifting break typability. We break down two representative lambda lifting algorithms into four elementary transformation steps, analyze their typing properties, and deene alternative steps that preserve ML typability where appropriate. Putting the revised steps together, we deene a lambda lifter that preserves ML-style typability. Our algorithm provides a starting point for implementing eecient generating extensions that perform ooine partial evaluation for polymorphically typed languages.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Concurrent Separation Logic with Weak Updates

Concurrent Separation Logic (CSL) provides a simple but powerful technique for reasoning about shared-memory concurrent programs. Unfortunately, CSL and separation logic can only support “strong updates,” where mutation to a memory location is safe only if there is a strong memory separation. This severely limits the applicability of CSL since most statically typed languages (e.g., ML, Java, C#...

متن کامل

Compiler Generation for Interactive Graphics Using Intermediate Code

This paper describes a compiler generator (cogen) designed for interactive graphics, and presents preliminary results of its application to pixel-level code. The cogen accepts and produces a reflective intermediate code in continuationpassing, closure-passing style. This allows low overhead run-time code generation as well as multi-stage compiler generation. We extend partial evaluation techniq...

متن کامل

A Simple Take on Typed Abstract Syntax in Haskell-like Languages

We present a simple way to program typed abstract syntax in a language following a Hindley-Milner typing discipline, such as Haskell and ML, and we apply it to automate two proofs about normalization functions as embodied in type-directed partial evaluation for the simply typed lambda calculus: normalization functions (1) preserve types and (2) yield long beta-eta normal forms.

متن کامل

Lambda - Dropping : Transforming Recursive Equations into Programswith Block

Lambda-lifting a functional program transforms it into a set of recursive equations. We present the symmetric transformation: lambda-dropping. Lambda-dropping a set of recur-sive equations restores block structure and lexical scope. For lack of scope, recursive equations must carry around all the parameters that any of their callees might possibly need. Both lambda-lifting and lambda-dropping t...

متن کامل

[DRAFT] The Calculus of Dependent Lambda Eliminations∗

Modern constructive type theory is based on pure dependently typed lambda calculus, augmented with user-defined datatypes. This paper presents an alternative called the Calculus of Dependent Lambda Eliminations, based on pure lambda encodings with no auxiliary datatype system. New typing constructs are defined which enable induction, as well as large eliminations with lambda encodings. These co...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1999